package cn.pfz.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ConsumptionItemExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ConsumptionItemExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCategory_idIsNull() {
            addCriterion("category_id is null");
            return (Criteria) this;
        }

        public Criteria andCategory_idIsNotNull() {
            addCriterion("category_id is not null");
            return (Criteria) this;
        }

        public Criteria andCategory_idEqualTo(Long value) {
            addCriterion("category_id =", value, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idNotEqualTo(Long value) {
            addCriterion("category_id <>", value, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idGreaterThan(Long value) {
            addCriterion("category_id >", value, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idGreaterThanOrEqualTo(Long value) {
            addCriterion("category_id >=", value, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idLessThan(Long value) {
            addCriterion("category_id <", value, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idLessThanOrEqualTo(Long value) {
            addCriterion("category_id <=", value, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idIn(List<Long> values) {
            addCriterion("category_id in", values, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idNotIn(List<Long> values) {
            addCriterion("category_id not in", values, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idBetween(Long value1, Long value2) {
            addCriterion("category_id between", value1, value2, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_idNotBetween(Long value1, Long value2) {
            addCriterion("category_id not between", value1, value2, "category_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idIsNull() {
            addCriterion("category_item_id is null");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idIsNotNull() {
            addCriterion("category_item_id is not null");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idEqualTo(Long value) {
            addCriterion("category_item_id =", value, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idNotEqualTo(Long value) {
            addCriterion("category_item_id <>", value, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idGreaterThan(Long value) {
            addCriterion("category_item_id >", value, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idGreaterThanOrEqualTo(Long value) {
            addCriterion("category_item_id >=", value, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idLessThan(Long value) {
            addCriterion("category_item_id <", value, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idLessThanOrEqualTo(Long value) {
            addCriterion("category_item_id <=", value, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idIn(List<Long> values) {
            addCriterion("category_item_id in", values, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idNotIn(List<Long> values) {
            addCriterion("category_item_id not in", values, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idBetween(Long value1, Long value2) {
            addCriterion("category_item_id between", value1, value2, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andCategory_item_idNotBetween(Long value1, Long value2) {
            addCriterion("category_item_id not between", value1, value2, "category_item_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idIsNull() {
            addCriterion("pay_type_id is null");
            return (Criteria) this;
        }

        public Criteria andPay_type_idIsNotNull() {
            addCriterion("pay_type_id is not null");
            return (Criteria) this;
        }

        public Criteria andPay_type_idEqualTo(Long value) {
            addCriterion("pay_type_id =", value, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idNotEqualTo(Long value) {
            addCriterion("pay_type_id <>", value, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idGreaterThan(Long value) {
            addCriterion("pay_type_id >", value, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idGreaterThanOrEqualTo(Long value) {
            addCriterion("pay_type_id >=", value, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idLessThan(Long value) {
            addCriterion("pay_type_id <", value, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idLessThanOrEqualTo(Long value) {
            addCriterion("pay_type_id <=", value, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idIn(List<Long> values) {
            addCriterion("pay_type_id in", values, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idNotIn(List<Long> values) {
            addCriterion("pay_type_id not in", values, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idBetween(Long value1, Long value2) {
            addCriterion("pay_type_id between", value1, value2, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andPay_type_idNotBetween(Long value1, Long value2) {
            addCriterion("pay_type_id not between", value1, value2, "pay_type_id");
            return (Criteria) this;
        }

        public Criteria andAmountIsNull() {
            addCriterion("amount is null");
            return (Criteria) this;
        }

        public Criteria andAmountIsNotNull() {
            addCriterion("amount is not null");
            return (Criteria) this;
        }

        public Criteria andAmountEqualTo(BigDecimal value) {
            addCriterion("amount =", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotEqualTo(BigDecimal value) {
            addCriterion("amount <>", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThan(BigDecimal value) {
            addCriterion("amount >", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("amount >=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThan(BigDecimal value) {
            addCriterion("amount <", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("amount <=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountIn(List<BigDecimal> values) {
            addCriterion("amount in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotIn(List<BigDecimal> values) {
            addCriterion("amount not in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("amount not between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountIsNull() {
            addCriterion("pay_amount is null");
            return (Criteria) this;
        }

        public Criteria andPay_amountIsNotNull() {
            addCriterion("pay_amount is not null");
            return (Criteria) this;
        }

        public Criteria andPay_amountEqualTo(BigDecimal value) {
            addCriterion("pay_amount =", value, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountNotEqualTo(BigDecimal value) {
            addCriterion("pay_amount <>", value, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountGreaterThan(BigDecimal value) {
            addCriterion("pay_amount >", value, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("pay_amount >=", value, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountLessThan(BigDecimal value) {
            addCriterion("pay_amount <", value, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("pay_amount <=", value, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountIn(List<BigDecimal> values) {
            addCriterion("pay_amount in", values, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountNotIn(List<BigDecimal> values) {
            addCriterion("pay_amount not in", values, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("pay_amount between", value1, value2, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andPay_amountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("pay_amount not between", value1, value2, "pay_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountIsNull() {
            addCriterion("discount_amount is null");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountIsNotNull() {
            addCriterion("discount_amount is not null");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountEqualTo(BigDecimal value) {
            addCriterion("discount_amount =", value, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountNotEqualTo(BigDecimal value) {
            addCriterion("discount_amount <>", value, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountGreaterThan(BigDecimal value) {
            addCriterion("discount_amount >", value, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("discount_amount >=", value, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountLessThan(BigDecimal value) {
            addCriterion("discount_amount <", value, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("discount_amount <=", value, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountIn(List<BigDecimal> values) {
            addCriterion("discount_amount in", values, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountNotIn(List<BigDecimal> values) {
            addCriterion("discount_amount not in", values, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("discount_amount between", value1, value2, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andDiscount_amountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("discount_amount not between", value1, value2, "discount_amount");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idIsNull() {
            addCriterion("create_user_id is null");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idIsNotNull() {
            addCriterion("create_user_id is not null");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idEqualTo(Long value) {
            addCriterion("create_user_id =", value, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idNotEqualTo(Long value) {
            addCriterion("create_user_id <>", value, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idGreaterThan(Long value) {
            addCriterion("create_user_id >", value, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idGreaterThanOrEqualTo(Long value) {
            addCriterion("create_user_id >=", value, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idLessThan(Long value) {
            addCriterion("create_user_id <", value, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idLessThanOrEqualTo(Long value) {
            addCriterion("create_user_id <=", value, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idIn(List<Long> values) {
            addCriterion("create_user_id in", values, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idNotIn(List<Long> values) {
            addCriterion("create_user_id not in", values, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idBetween(Long value1, Long value2) {
            addCriterion("create_user_id between", value1, value2, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_user_idNotBetween(Long value1, Long value2) {
            addCriterion("create_user_id not between", value1, value2, "create_user_id");
            return (Criteria) this;
        }

        public Criteria andCreate_timeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreate_timeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreate_timeEqualTo(Date value) {
            addCriterion("create_time =", value, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeGreaterThan(Date value) {
            addCriterion("create_time >", value, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeLessThan(Date value) {
            addCriterion("create_time <", value, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeIn(List<Date> values) {
            addCriterion("create_time in", values, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "create_time");
            return (Criteria) this;
        }

        public Criteria andCreate_timeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "create_time");
            return (Criteria) this;
        }

        public Criteria andCnoIsNull() {
            addCriterion("cno is null");
            return (Criteria) this;
        }

        public Criteria andCnoIsNotNull() {
            addCriterion("cno is not null");
            return (Criteria) this;
        }

        public Criteria andCnoEqualTo(String value) {
            addCriterion("cno =", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoNotEqualTo(String value) {
            addCriterion("cno <>", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoGreaterThan(String value) {
            addCriterion("cno >", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoGreaterThanOrEqualTo(String value) {
            addCriterion("cno >=", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoLessThan(String value) {
            addCriterion("cno <", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoLessThanOrEqualTo(String value) {
            addCriterion("cno <=", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoLike(String value) {
            addCriterion("cno like", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoNotLike(String value) {
            addCriterion("cno not like", value, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoIn(List<String> values) {
            addCriterion("cno in", values, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoNotIn(List<String> values) {
            addCriterion("cno not in", values, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoBetween(String value1, String value2) {
            addCriterion("cno between", value1, value2, "cno");
            return (Criteria) this;
        }

        public Criteria andCnoNotBetween(String value1, String value2) {
            addCriterion("cno not between", value1, value2, "cno");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}